<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ include file="/common/include/page.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>管理员列表</title>
</head>
<body>
	<table border="1" width="70%">
		<tr >
			<td>序号</td>
			<td>ID</td>
			<td>email</td>
			<td>phone</td>
			<td>qq</td>
			<td>状态</td>
			<td>真实姓名</td>
			<td>创建时间</td>
			<td>更新时间</td>
			<td>上次登录时间</td>
		</tr>
		<c:forEach items="${adminList }" var="admin" varStatus="stat">
			<tr style="background: ${stat.count % 2 == 0 ?'grey':''}">
				<td>${stat.count }</td>
				<td>${admin.id }</td>
				<td title="${admin.email }">
						<c:set value="${fn:indexOf(admin.email, '@')}" var="index"/>
						<c:set value="${fn:length(admin.email)}" var="totalLength"/>
						${fn:substring(admin.email , 0, index - 1)}*${fn:substring(admin.email , index,totalLength)}
				</td> 
				<td>${admin.phone }</td>
				<td>${admin.qq }</td>
				<td>${admin.statusStr }</td>
				<td>${admin.trueName }</td>
				<td><fmt:formatDate value="${admin.createTime }" pattern="yyyy-MM-dd HH:mm:ss" /></td>
				<td><fmt:formatDate value="${admin.updateTime }" pattern="yyyy-MM-dd HH:mm:ss" /></td>
				<td><fmt:formatDate value="${admin.lastLoginTime }" pattern="yyyy-MM-dd HH:mm:ss" /></td>
			</tr>
		</c:forEach>
	</table>
</body>
</html>